package cn.tt.core.config;

import org.springframework.boot.bind.RelaxedPropertyResolver;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Description 全局配置类
 * @Date 2017/7/29 7:51
 * @Since v1.7
 * @Autor Nick
 */
public class Global {

	private Global () {}

	/**
	 * 当前对象实例
	 */
	private static Global global = new Global();

	static RelaxedPropertyResolver resolver;

	/**
	 * 保存全局属性值，使用ConcurrentHashMap更加安全
	 */
	private static Map<String, String> globalMap = new ConcurrentHashMap();

	/**
	 * 是/否
	 */
	public static final String YES = "1";
	public static final String NO = "0";

	/**
	 * 对/错
	 */
	public static final String TRUE = "true";
	public static final String FALSE = "false";

	/**
	 * 获取当前对象实例
	 */
	public static Global getInstance() {
		return global;
	}


}
